function f_init_tmpvar()
{
    declare fun_name
    fun_name="f_init_tmpvar"
    alter_file="${sql_file}"
    if [ "${mode_opt}x" == "crontab_dropx" ]
    then
        true
    elif [ ! -f "${alter_file}" ] && [ -z "${clear_table_list}" ]
    then
        f_logging "$(eval echo ${log_addr}):ERROR" "'${alter_file}' 文件不存在" "2" "1"
    elif [ "$(grep -c '"' ${alter_file} 2>/dev/null)x" != "0x" ]
    then
        f_logging "$(eval echo ${log_addr}):WARN" "请勿在sql中使用双引号, 建议使用单引号代替"
    fi

    time_stamp="$(date +%N%s)"
    alter_file_tmp="${sql_file}.tmp.${time_stamp}"                         #格式化后的sql存放文件
    alter_file_tmp1="${alter_file}.tmp1.${time_stamp}"                     #定义三个临时文件
    alter_file_tmp2="${alter_file}.tmp2.${time_stamp}"
    alter_file_tmp3="${alter_file}.tmp3.${time_stamp}"
    sql_exe_error="${alter_file}.error.log.${time_stamp}"
    has_mdl_lock_file="${alter_file}.mdl.file.${time_stamp}"               #本次改表如果存在mdl锁就生成这个文件
    has_max_process_file="${alter_file}.process.file.${time_stamp}"        #本次改表如果存在连接数过多, 就生成这个文件
    #将转义的字符变成mysql支持的, \' --> '' \" --> "", 这步是放在临时文件
    [ -f "${alter_file}" ] && sed "s/\\\'/''/g" ${alter_file}|sed 's/\\\"/""/g' > ${alter_file_tmp}
    [ -f "${alter_file}" ] && cat ${alter_file_tmp} > ${alter_file}        #临时文件恢复到sql文件
    return 0
}

